/************************************************************************************
* Filename:				CStateMachine.h    
* Date Created:         04/29/2011                        
* Mod. Date:            04/29/2011                        
* Mod. Initials:		JW
* Author:				John Wileczek
* Purpose:				Define the CStateMachine class. This class will act as the
*						state machine for the game and handle changing, updating, and
*						rendering the states in the game.
*************************************************************************************/
#ifndef	CSTATEMACHINE_H_
#define CSTATEMACHINE_H_

//Remove and replace with our vector later
#include <vector>
using std::vector;

//Forward Declarations
class CAbstractState;

class CStateMachine
{
private:
	vector<CAbstractState*>			m_vStates;
	
public:
/*********************************************************************************
 * CStateMachine():		Constructor will call Initialize()   
 * 			      			      			      
 * Ins:					void 
 *      		     
 * Outs:				void
 *
 * Returns:				void
 *
 * Mod. Date:		    04/29/2011
 * Mod. Initials:	    JW
 ********************************************************************************/
CStateMachine();

/*********************************************************************************
 * ~CStateMachine():	Destructor will call Shutdown().  
 * 			      			      			      
 * Ins:					void 
 *      		     
 * Outs:				void
 *
 * Returns:				void
 *
 * Mod. Date:		    04/29/2011
 * Mod. Initials:	    JW
 ********************************************************************************/
~CStateMachine();

/*********************************************************************************
 * Initialize():		This function will initialize the state machine and push   
 * 						the appropriate start state on.
 *			      
 * Ins:					void 
 *      		     
 * Outs:				void
 *
 * Returns:				void
 *
 * Mod. Date:		    04/29/2011  
 * Mod. Initials:	    JW  
 ********************************************************************************/
void Initialize();

/*********************************************************************************
 * Update():			This function will update the state machine and the correct.
 *						states in the vector
 *
 * Ins:					fDT 
 *      		     
 * Outs:				void
 *
 * Returns:				void
 *
 * Mod. Date:		    04/29/2011  
 * Mod. Initials:	    JW  
 ********************************************************************************/
void Update(float fDT);

/*********************************************************************************
 * Shutdown():		This function will shutdown the state machine and clean up   
 * 					necessary memory.
 *			      
 * Ins:					void 
 *      		     
 * Outs:				void
 *
 * Returns:				void
 *
 * Mod. Date:		    04/29/2011  
 * Mod. Initials:	    JW  
 ********************************************************************************/
void Shutdown();

/*********************************************************************************
 * PushState():		This function will push the new state onto the vector and   
 * 						enter correctly
 *			      
 * Ins:					pNewState 
 *      		     
 * Outs:				void
 *
 * Returns:				void
 *
 * Mod. Date:		    04/29/2011  
 * Mod. Initials:	    JW  
 ********************************************************************************/
void PushState(CAbstractState* pNewState);

/*********************************************************************************
 * PopState():			This function will pop the state at the back of the vector   
 * 						off and exit correctly.
 *			      
 * Ins:					void 
 *      		     
 * Outs:				void
 *
 * Returns:				void
 *
 * Mod. Date:		    04/29/2011  
 * Mod. Initials:	    JW  
 ********************************************************************************/
void PopState();

/*********************************************************************************
 * ClearAllStates():	This function will clear all the states and exit them  
 * 						correctly.
 *			      
 * Ins:					void 
 *      		     
 * Outs:				void
 *
 * Returns:				void
 *
 * Mod. Date:		    04/29/2011  
 * Mod. Initials:	    JW  
 ********************************************************************************/
void ClearAllStates();

/*********************************************************************************
 * Render():		Render the current state and objects in it.   
 * 			      			      
 * Ins:			    void  
 *      		     
 *
 * Outs:		    void  
 *
 * Returns:		    void  
 *
 * Mod. Date:		04/29/2011      
 * Mod. Initials:	JW      
 ********************************************************************************/
void Render();


};

#endif